<div class="row-content am-cf">
	<div class="row">
		<div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
			<div class="widget am-cf">
				<div class="widget-head am-cf">
					<div class="widget-title am-fl">保证金充值到账确认</div>
					<div class="widget-function am-fr">
						<a href="javascript:;" class="am-icon-cog"></a>
					</div>
				</div>
				<div class="widget-body am-fr">
					<form class="am-form tpl-form-line-form" id="rechargeForm" method="post">
						<input type="hidden" name="agentId" th:value="${agent.id}" />
						<div class="am-form-group">
							<label for="realName" class="am-u-sm-2 am-form-label">合伙人姓名:</label>
							<div class="am-u-sm-10" th:text="${agent.realName}"></div>
						</div>
						
						<div class="am-form-group">
							<label for="mobile" class="am-u-sm-2 am-form-label">手机号:</label>
							<div class="am-u-sm-10" th:text="${agent.mobile}" >
							</div>
						</div>
					
						
						<div class="am-form-group">
							<label for="idcard" class="am-u-sm-2 am-form-label">身份证:</label>
							<div class="am-u-sm-10" th:text="${agent.idcard}"></div>
						</div>
						
						<div class="am-form-group">
							<label for="amount" class="am-u-sm-2 am-form-label">充值保证金金额:</label>
							<div class="am-u-sm-2 am-u-end">
								<input type="number" id="amount" class="tpl-form-input" placeholder="保证金金额" name="amount"   required="required" /> 
							</div>
						</div>
						
							
						<div class="am-form-group">
							<label for="cardName" class="am-u-sm-2 am-form-label">合伙人银行:</label>
							<div class="am-u-sm-3 am-u-end">
								<select id="bankId"  data-am-selected="{btnSize:'sm'}" name="bankId"  >
									<option value="">请选择银行</option>
									<option th:each="bank : ${banks}" 	     th:value="${bank.id}"    th:text="${bank.name}"></option>
								</select> 
							</div>
						</div>
						
						<div class="am-form-group">
							<label for="cardNo" class="am-u-sm-2 am-form-label">合伙人银行卡号:</label>
							<div class="am-u-sm-2 am-u-end">
								<input type="number" id="bankCardNo" class="tpl-form-input" placeholder="银行卡号" name="bankCardNo"/> 
							</div>
						</div>
						
						<div class="am-form-group">
							<label for="successTime" class="am-u-sm-2 am-form-label">充值到账时间:</label>
							<div class="am-u-sm-2 am-u-end">
								<input type="text" placeholder="成功时间" required="required" id="successTime" name="successTime" class="form-datetime-lang am-form-field"/>
							</div>
						</div> 
						
						<div class="am-form-group">
							<label for="cardName" class="am-u-sm-2 am-form-label">是否到账:</label>
							<div class="am-u-sm-10">
								<select id="isReceive" data-am-selected="{btnWidth: '15%', btnSize: 'sm'}"  name="isReceive"  >
									<option value="0">否</option>
									<option value="1">是</option>
								</select> 
							</div>
						</div> 
						
   					
						<div class="am-form-group">
							<div class="am-u-sm-10 am-u-sm-push-2">
								
								<button type="button" onclick="javascript:$('#rechargeForm').submit();"
									class="am-btn am-btn-primary tpl-btn-bg-color-success ">提交</button>
										<button type="button" onclick="loadPage('recharge/rechargeList')"
									class="am-btn am-btn-success tpl-btn-bg-color-success ">返回</button>
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>

	</div>
	<script th:inline="javascript">
	<![CDATA[
		
	var canSubmit = true;//表单重复提交控制 
	
	$("#isReceive,#bankId").selected();
	
	$(document).ready(function(){
		
		$('#successTime').datetimepicker({
			format: 'yyyy-mm-dd hh:ii:ss',
			autoclose: true,
	        todayBtn: true,
			language:  'zh-CN'
		});
		
	});
		

	validateUserForm();
	function validateUserForm(){  
		
		 $('#rechargeForm').validate({
		        errorElement : 'span',
		        errorClass : 'am-icon-times',
		        focusInvalid : true,
		        onkeyup:false,
		        ignore : "",
		        rules : {
		            mobile : {
		                required : true,
		                maxlength: 11
		            }
		            
		        },
		        messages : {
		        	
		        },
		        submitHandler : function(form) {
		        	if(canSubmit){
		        		canSubmit = false;
		        		commit('rechargeForm', 'recharge/save','recharge/rechargeList');
		        	}
		        	
		        }
		    });

	}
		]]>
	</script>